import {createRouter, createWebHistory} from 'vue-router';
import {MicroLayout} from '@/layouts/index';
import HomeView from '../views/HomeView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'MainApp',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'About',
      component: () => import('../views/AboutView.vue'),
    },
    {
      name: 'Login',
      path: '/login', // 匹配微应用1
      component: () => import('../views/Login.vue'),
    },
    {
      name: 'baseApp',
      path: '/base-app/:path(.*)*', // 匹配微应用1
      component: MicroLayout,
    },
  ],
});

export default router;
